﻿@model CMS2.Models.Class

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Class</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Section)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Section)
            @Html.ValidationMessageFor(model => model.Section)
        </div>
    
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
        <div>
            <ul>
            
            @foreach (var item in Model.Subjects)
            {
        
                    <li>@item.Name</li>     
        
            }
       
            </ul>
         </div>
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
